/**
 * @author xinjie.txt
 * @time: 2020年7月8日 下午6:46:43
 */
package com.jiepu.exercise.primary.chapter5.exercise2;

/**
 * @Description: 
 * @author xinjie.txt
 */
public class Duration {
	private int hours;
	private int minutes;
	private int seconds;
	/**
	 * @return the hours
	 */
	public int getHours() {
		return hours;
	}
	/**
	 * @param hours the hours to set
	 */
	public void setHours(int hours) {
		this.hours = hours;
	}
	/**
	 * @return the minutes
	 */
	public int getMinutes() {
		return minutes;
	}
	/**
	 * @param minutes the minutes to set
	 */
	public void setMinutes(int minutes) {
		this.minutes = minutes;
	}
	/**
	 * @return the seconds
	 */
	public int getSeconds() {
		return seconds;
	}
	/**
	 * @param seconds the seconds to set
	 */
	public void setSeconds(int seconds) {
		this.seconds = seconds;
	}
	/**
	 * 
	 */
	public Duration() {
		super();
		// TODO Auto-generated constructor stub
	}
	/**
	 * @param hours
	 * @param minutes
	 * @param seconds
	 */
	public Duration(int hours, int minutes, int seconds) {
		super();
		this.hours = hours;
		this.minutes = minutes;
		this.seconds = seconds;
	}
	
	/*public Duration(int toTalSeconds) {
		super();
		this.hours = hours;
		this.minutes = minutes;
		this.seconds = seconds;
	}*/
	
	public int getTotalSeconds(Duration duration) {
		int totalseconds;
		totalseconds=duration.getHours()*60*60+duration.getMinutes()*60+duration.getSeconds();
		return totalseconds;
		
	}
}
